<?php

use app\assets\BackendAsset as Asset;

?>
<el-main class="content-wrapper p-15">
    <transition name="fadeInDown">
        <div v-if="showCheckbox">
            <el-checkbox :indeterminate="isCheckHalf" v-model="isCheckAll"
                         @change="handleCkAllChange">
                全选
            </el-checkbox>
            <div class="mt-15 mb-15"></div>
            <el-checkbox-group v-model="checkedApis" @change="handleCheckedChange">
                <el-checkbox v-for="(item, key) in apiList" :label="key" :key="key">
                    {{item.name}}
                </el-checkbox>
            </el-checkbox-group>
        </div>
    </transition>
    <el-timeline v-show="showTimeline">
        <transition-group name="fadeInDown">
            <el-timeline-item v-for="(item, key) in messageList" :timestamp="item.timestamp" v-bind:key="key"
                              :icon="item.icon" :type="item.type" :color="item.color">
                <span v-if="item.type === 'primary'">
                    {{item.title}}
                </span>
                <span v-else-if="item.type === 'loading'">
                    <i class="el-icon-loading"></i>&nbsp;{{item.title}}
                </span>
                <span :class="'text-' + item.type" v-else-if="item.type !== 'success'">
                    {{item.title}}
                </span>
                <span :class="'text-' + item.type" v-else>
                    {{item.title}}
                </span>
            </el-timeline-item>
        </transition-group>
    </el-timeline>
</el-main>

<?= Asset::addCss($this, '/css/backend/clear-cache.css'); ?>
<?= Asset::addScript($this, '/js/backend/clear-cache.js'); ?>
<?= $this->registerJs('
    window.instance = new app();
'); ?>
